<template>
  <div class="content-header">
    <div class="content-header-left">
      <div class="content-header-title" :style="style">{{title}}</div>
<!--      <view-linked-info :linkKey="'payWall'" ></view-linked-info>-->
    <view-linked-info :linkKey="'publicapi'" v-if="title==='Public API'"></view-linked-info>
    </div>
    <div class="content-header-right">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import billingLog from '@/assets/img/billing.png'
export default {
  name: 'content-header',
  // props: ['title', 'icon', 'popover'],
  props: {
    title: {},
    icon: {
      default: billingLog
    },
    popover: {}
  },
  data () {
    return {
      style: {}
    }
  },
  created () {
    this.style = {
      'background-image': `url(${this.icon})`
    }
  }
}
</script>

<style scoped lang="scss">
.content-header{
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  padding: 0 20px;
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px 0 #0000001A;
  &-left{
    display: flex;
    align-items: center;
  }
  &-title{
    padding-left: 32px;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: left center;
    color: #262626;
    font-size: 20px;
    font-weight: bold;
  }
}
</style>
